package cn.group.service.impl;

import cn.group.mapper.ManagerMapper;
import cn.group.service.ManagerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import pojo.entity.Manager;

import java.util.List;

@Service
public class ManagerServiceImpl implements ManagerService {
    @Autowired
    ManagerMapper managerMapper;

    @Override
    public List<Manager> searchAllManagers() {
        return managerMapper.selectAllManagers();

    }

    @Override
    public List searchManagerByName(String managerName) {
        return managerMapper.selectManagerByName(managerName);
    }

    @Override
    public int deleteManagerById(Long managerId) {
        return managerMapper.deleteManagerById(managerId);
    }

    @Override
    public int updateManager(Manager manager) {
        return managerMapper.updateManager(manager);
    }

    @Override
    public Manager searchManagerById(Long managerId) {
        return managerMapper.selectManagerById(managerId);
    }

    @Override
    public int addManager(Manager manager) {
        return managerMapper.addManager(manager);
    }
}
